package com.hxh.learn.vo;

import cn.hutool.core.date.DateUtil;
import com.hxh.learn.model.SysRule;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * @Author: hxh
 * @Date: 2023/3/7
 */
@Data
public class SysRuleInsertVo {
    @NotBlank
    @ApiModelProperty(value = "角色名称", required = true)
    private String roleName;

    @ApiModelProperty("角色描述")
    private String roleDoc;


    public SysRule convert() {
        SysRule rule = new SysRule();
        rule.setRoleName(roleName);
        rule.setRoleDoc(roleDoc);
        rule.setCreateTime(DateUtil.current());
        rule.setCreatUser("hxh");
        return rule;
    }

}
